<script setup>
import { onKeyStroke, useBattery, usePageLeave, useStorage } from '@vueuse/core';
import { watch } from 'vue';
const input = useStorage('unique-key', 'Hello, world!');

const { charging, chargingTime, dischargingTime, level } = useBattery()
const isLeft = usePageLeave()

onKeyStroke('Enter', (e) => {
  console.log('Enter key pressed', e, level);
});


watch(isLeft, (newVal) => {
  console.log('isLeft', newVal);
});

</script>

<template>
  <div>
    <el-input v-model="input" style="width: 200px" />
  </div>
</template>
